//
//  YYT_HistoryTableViewCell.m
//  AudioVisualFeast
//
//  Created by 张琪 on 16/2/27.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "YYT_HistoryTableViewCell.h"
#import <UIImageView+WebCache.h>
@implementation YYT_HistoryTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.backgroundColor = [UIColor blackColor];
        self.imageview = [[UIImageView alloc] initWithFrame:CGRectZero];
        [self addSubview:self.imageview];
        _imageview.clipsToBounds = YES;
        
        
        self.title = [[UILabel alloc] initWithFrame:CGRectZero];
        [_imageview addSubview:self.title];
        _title.font = [UIFont systemFontOfSize:11];
        _title.textColor = [UIColor whiteColor];
        
    }
    return self;
}
-(void)layoutSubviews {
    [super layoutSubviews];
    self.imageview.frame = self.bounds;
    self.title.frame = CGRectMake(5, self.frame.size.height - 20, self.frame.size.width, 11);
}
-(void)setDataSource:(NSArray *)DataSource{
    _DataSource = DataSource;
    _title.text = DataSource[1];
    _title.textColor = [UIColor lightGrayColor];
    _title.font = [UIFont systemFontOfSize:15];
    _imageview.contentMode = UIViewContentModeScaleToFill;
    [_imageview sd_setImageWithURL:[NSURL URLWithString:DataSource[0]]];
    
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
